const state = {
  main: 0,
  isStart:false,
  listenUrl:'http://127.0.0.1',
  payStr:''
}

const mutations = {
  CHANGE_PAYSTR(state,params){
    state.payStr = params
  },
  CHANGE_ISSART(state,params){
    state.isStart = params
  },
  CHANGE_URL(state,params){
    state.listenUrl = params
  },
  DECREMENT_MAIN_COUNTER (state) {
    state.main--
  },
  INCREMENT_MAIN_COUNTER (state) {
    state.main++
  }
}

const actions = {
  someAsyncTask ({ commit }) {
    // do something async
    commit('INCREMENT_MAIN_COUNTER')
  }
}

export default {
  state,
  mutations,
  actions
}
